home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / GWMALLOC.ZIP;1 / GWMALLOC.TAR / gw_malloc / dbg_values.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-08  |  2.8 KB  |  68 lines

  1. /*
  2.  * debug values for MALLOC_DEBUG and _malloc_debug
  3.  *
  4.  * Copyright 1992 by Gray Watson and the Antaire Corporation
  5.  *
  6.  * This file is part of the malloc-debug package.
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library (see COPYING-LIB); if not, write to the
  20.  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  *
  22.  * The author of the program may be contacted at gray.watson@antaire.com
  23.  *
  24.  * $Id: dbg_values.h,v 1.3 1993/04/05 22:30:05 gray Exp $
  25.  */
  26.  
  27. #ifndef __DBG_VALUES_H__
  28. #define __DBG_VALUES_H__
  29.  
  30. /*
  31.  * special debug codes which detail what debug features are enabled
  32.  */
  33.  
  34. /* logging */
  35. #define DEBUG_LOG_STATS        BIT_FLAG(0)    /* generally log statistics */
  36. #define DEBUG_LOG_NONFREE    BIT_FLAG(1)    /* report non-freed pointers */
  37. #define DEBUG_LOG_PERROR    BIT_FLAG(2)    /* log perror problems */
  38. #define DEBUG_LOG_TRANS        BIT_FLAG(3)    /* log memory transactions */
  39. #define DEBUG_LOG_BAD_POINTER    BIT_FLAG(4)    /* log pointer info on error */
  40. #define DEBUG_LOG_ADMIN        BIT_FLAG(5)    /* log background admin info */
  41. #define DEBUG_LOG_BLOCKS    BIT_FLAG(6)    /* log blocks when heap-map */
  42. #define DEBUG_LOG_UNKNOWN    BIT_FLAG(7)    /* report unknown non-freed */
  43.  
  44. /* checking */
  45. #define DEBUG_CHECK_FENCE    BIT_FLAG(10)    /* check fence-post errors  */
  46. #define DEBUG_CHECK_HEAP    BIT_FLAG(11)    /* examine heap adm structs */
  47. #define DEBUG_CHECK_LISTS    BIT_FLAG(12)    /* check the free lists */
  48. #define DEBUG_CHECK_DBLOCK    BIT_FLAG(13)    /* closely examine dblocks */
  49. #define DEBUG_CHECK_DB_FENCE    BIT_FLAG(14)    /* check fences for dblocks */
  50. #define DEBUG_CHECK_FREE    BIT_FLAG(15)    /* check free blocks of 0's */
  51. #define DEBUG_CHECK_FUNCS    BIT_FLAG(16)    /* check functions */
  52.  
  53. /* misc */
  54. #define DEBUG_REALLOC_COPY    BIT_FLAG(20)    /* copy all reallocations */
  55. #define DEBUG_FREE_BLANK    BIT_FLAG(21)    /* write over free'd memory */
  56. #define DEBUG_ERROR_ABORT    BIT_FLAG(22)    /* abort on error else exit */
  57. #define DEBUG_ALLOC_BLANK    BIT_FLAG(23)    /* write over to-be-alloced */
  58. #define DEBUG_HEAP_CHECK_MAP    BIT_FLAG(24)    /* heap-map on heap-check */
  59. #define DEBUG_PRINT_PERROR    BIT_FLAG(25)    /* print errors to STDERR */
  60.  
  61. /*
  62.  * special flags that after being set or not/set and process start-up, cannot
  63.  * be reset.
  64.  */
  65. #define DEBUG_NOT_CHANGEABLE    (DEBUG_CHECK_FREE)
  66.  
  67. #endif /* ! __DBG_VALUES_H__ */
  68.